package com.src.calendarItem;

public class Event {
 
	private int id;
	private String summary;
	private String category;
	private String startDate;
	private String startTime;
	private String endDate;
	private String endTime;
	private String description;
	private String location;
	private EventClass eventclass;
	
	public enum EventClass {PUBLIC,PRIVATE,CONFIDENTIAL};
	
	public Event(int id,String summary, String category, String stDt, String stTm, String endDt,String endTm, String desc, String loc, EventClass eventclass)
	{
		this.id = id;
		this.summary = summary;
		this.category = category;
		this.startDate = stDt;
		this.startTime = stTm;
		this.endDate = endDt;
		this.endTime = endTm;
		this.location = loc;
		this.description = desc;
		this.eventclass = eventclass;
	}
	
	public Event(String summary, String category, String stDt, String stTm, String endDt,String endTm, String desc, String loc, EventClass eventclass)
	{
		this.summary = summary;
		this.category = category;
		this.startDate = stDt;
		this.startTime = stTm;
		this.endDate = endTm;
		this.endTime = endTm;
		this.location = loc;
		this.description = desc;
		this.eventclass = eventclass;
	}
	
	
	public void setID(int eventid)
	{
		this.id = eventid;
	}
	
	public int getID()
	{
		return this.id;
	}
	
	public String getSummary()
	{
		return this.summary;
	}
	
	public void setSummary(String sum)
	{
		this.summary = sum;
	}
	
	public String getCategory()
	{
		return this.category;
	}
	
	public void setCategory(String cate)
	{
		this.category = cate;
	}
	
	public String getStartDate()
	{
		return this.startDate;
	}
	
	public void setStartDate(String stDt)
	{
		this.startDate =  stDt;
	}
	
	public String getStartTime()
	{
		return this.startTime;
	}
	
	public void setStartTime(String stTm)
	{
		this.startTime = stTm;
	}
	
	public String getEndDate()
	{
		return this.endDate;
	}
	public void setEndDate(String edDt)
	{
		this.endDate =  edDt;
	}
	
	public String getEndTime()
	{
		return this.endTime;
	}
	public void setEndTime(String edTm)
	{
		this.endTime = edTm;
	}
	
	public String getDescription()
	{
		return this.description;
	}
	
	public void setDescription(String desc)
	{
		this.description = desc;
	}
	
	public String getLocation()
	{
		return this.location;
	}
	
	public void setLocation(String loc)
	{
		this.location = loc;
	}
	
	public EventClass getEventClass()
	{
		return this.eventclass;
	}
	
	public void setEventClass(EventClass cla)
	{
		this.eventclass = cla;
	}
	
	public String toString()
	{
		return "Event Summary: "+this.summary+"\nEvent Category: "+this.category+"\nEvent Start Time: "+this.startTime+"\nEvent End Time: "+this.endTime+
		"\nEvent Location: "+this.location+"\nEvent Description: "+this.description+"\nEvent Class: "+this.eventclass.toString();
	}
	
	public String toShortView()
	{
		return this.startTime.substring(0, 2)+":"+this.startTime.substring(2,4)+":"+this.startTime.substring(4, 6)+"--"+this.summary+((this.location==null||this.location.isEmpty())?(""):(" at "+ this.location));
	}
	
}

